﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

using Weazel.Math;

using Microsoft.VisualStudio.TestTools.UnitTesting;

#endregion

namespace Weazel.Math.Test
{
  [TestClass]
  public class TestSimpleDivision
  {
    [TestMethod]
    public void TestSingleFigureDivision_1()
    {
      uint[] a = new uint[] { 100 };
      uint[] result = new uint[1];
      uint remainder = 0;

      Integer.Divide(ref result, ref remainder, a, 1);

      Assert.AreEqual(100, (int)result[0]);
      Assert.AreEqual(0, (int)remainder);
    }

    [TestMethod]
    public void TestSingleFigureDivision_2()
    {
      uint[] a = new uint[] { 100 };
      uint[] result = new uint[1];
      uint remainder = 0;

      Integer.Divide(ref result, ref remainder, a, 3);

      Assert.AreEqual(33, (int)result[0]);
      Assert.AreEqual(1, (int)remainder);
    }
  }
}
